package cn.momo.mobile.common;

import android.app.Application;

public class AppApplication extends Application{
	
	private static AppApplication application;
	
	private AppContext appContext;
	
	public static AppApplication getInstance(){
		return application;
	}
	
	@Override
	public void onCreate() {
		super.onCreate();
		application = this;
		appContext = AppContext.getInstance();
		appContext.init();
	}
	
	public AppContext getAppContext(){
		return appContext;
	}
	
	@Override
	public void onTerminate() {
		super.onTerminate();
		appContext.destroy();
	}
	
}
